<template>
  <span @click="fullScreen" class="fullScreenbtn">
    <svg-icon icon-class="fullscreen"></svg-icon
  ></span>
</template>

<script>
import screenfull from 'screenfull'
export default {
  methods: {
    fullScreen () {
      if (screenfull.isEnabled) {
        // 判断浏览器是否支持全屏
        screenfull.request()
      } else {
        this.$message.warning('当前浏览器不支持全屏')
      }
    }
  }
}
</script>

<style lang="scss" scoped></style>
